﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WXYW.BLL;

namespace WXYW
{
    public partial class ExportSRUForms : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void rtfButton_Click(object sender, EventArgs e)
        {
            ExportService service = new ExportService();
            GridView gv = new GridView();
            gv.DataSource = service.ExportReturnToFactoryForms(RTFStartTextBox.Text,RTFEndTextBox.Text);
            gv.DataBind();
            ExportExcel.ExportExcelFromGridView(gv, "返厂信息");
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            ExportService service = new ExportService();
            GridView gv = new GridView();
            gv.DataSource = service.ExportSparePartApplyForms(ssastartTextBox.Text, ssaendTextBox.Text);
            gv.DataBind();
            ExportExcel.ExportExcelFromGridView(gv, "备件信息");
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            ExportService service = new ExportService();
            GridView gv = new GridView();
            gv.DataSource = service.ExportUpgradeFroms(upstartTextBox.Text, upendTextBox.Text);
            gv.DataBind();
            ExportExcel.ExportExcelFromGridView(gv, "升级信息");
        }
    }
}
